<%@page import="com.library.LibraryConstants"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@include file="/html/library/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head> 
<body>
<h1>Add / Edit Form</h1>
	<%
		PortletURL updateBookURL = renderResponse.createActionURL();
		updateBookURL.setParameter(ActionRequest.ACTION_NAME,
				LibraryConstants.ACTION_UPDATE_BOOK);
	%>
	<%-- <form name="<portlet:namespace/>fm" method="POST"
		action="<%=updateBookURL.toString()%>">
		Book Title: <input type="text" name="<portlet:namespace/>bookTitle" />
		<br />Author: <input type="text" name="<portlet:namespace/>author" />
		<br /> <input type="submit" value="Save" />
	</form> --%>
	
	<aui:form name="fm" method="POST"
		action="<%=updateBookURL.toString()%>">
		<aui:input name="bookTitle" label="Book Title" >
		<aui:validator name="required"/>
		</aui:input>
		<aui:input name="author" >
		<aui:validator name="required"/>
		</aui:input>
		<aui:button type="submit" value="Save" />
	</aui:form>
	<a href="<portlet:renderURL/>">&laquo; Go Back</a>
</body>

<aui:script> 
Liferay.Util.focusFormField( document.<portlet:namespace />fm.<portlet:namespace />bookTitle);
 </aui:script>
</html>